-- GENERATED SPELL FOR [XB-488 Disposalbot] --


function spell0_34273(pUnit, Event) --@Cut Scrap Metal,n/a--
pUnit:FullCastSpellOnTarget(65080,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_34273', 4000, 1)
end

function spell1_34273(pUnit, Event) --@Cut Scrap Metal,n/a--
pUnit:FullCastSpellOnTarget(65104,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_34273', 4000, 1)
end

function spell2_34273(pUnit, Event) --@Self Destruct,Self--
pUnit:FullCastSpellOnTarget(65084,pUnit)
pUnit:RegisterEvent('Sorts_34273', 4000, 1)
end

function Sorts_34273(pUnit, Event)
local choix_sorts_34273 = math.random(0, 2)
if choix_sorts_34273 == 0 then
pUnit:RegisterEvent('spell0_34273', 1, 1)
end
if choix_sorts_34273 == 1 then
pUnit:RegisterEvent('spell1_34273', 1, 1)
end
if choix_sorts_34273 == 2 then
pUnit:RegisterEvent('spell2_34273', 1, 1)
end
end

function mob34273_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_34273', math.random(1500, 3000), 1)
end

function mob34273_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob34273_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob34273_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(34273, 1, 'mob34273_Action')
RegisterUnitEvent(34273, 2, 'mob34273_Leave')
RegisterUnitEvent(34273, 3, 'mob34273_Kill')
RegisterUnitEvent(34273, 4, 'mob34273_Die')
